recover

inline fun <T> Try<T>.recover(rescue: (Throwable) -> T): Try<T>

Returns this Try if this is a Success or a Try created for the rescue operation if this is a Failure.

Return

This Try if this is a Success or a Try created for the rescue operation if this is a Failure.

Parameters

rescue

Function creating a new value from the exception of a Failure.